<html>
	<head>
		<?php 			
			include_once ($_SERVER['DOCUMENT_ROOT'].'/Par-Ideal/PROJETO/src/controller/SessaoController.php');
			include_once ($_SERVER['DOCUMENT_ROOT'].'/Par-Ideal/PROJETO/src/dao/FestaDao.php');
			include_once $_SERVER['DOCUMENT_ROOT'].'/Par-Ideal/PROJETO/src/bean/Festa.php';
			sessaoController::validaSessao();
			include_once ($_SERVER['DOCUMENT_ROOT'].'/Par-Ideal/PROJETO/javaScript/template.php');
			include_once ($_SERVER['DOCUMENT_ROOT'].'/Par-Ideal/PROJETO/javaScript/menuadm.php');
			include_once ($_SERVER['DOCUMENT_ROOT'].'/Par-Ideal/PROJETO/src/controller/ClienteController.php');
			include_once ($_SERVER['DOCUMENT_ROOT'].'/Par-Ideal/PROJETO/src/controller/FestaController.php');
		?>
<script type="text/javascript">
$(function(){
    $(".input-search").keyup(function(){
        //pega o css da tabela 
        var tabela = $(this).attr('alt');
        if( $(this).val() != ""){
            $("."+tabela+" tbody>tr").hide();
            $("."+tabela+" td:contains-ci('" + $(this).val() + "')").parent("tr").show();
        } else{
            $("."+tabela+" tbody>tr").show();
        }
    }); 
});
$.extend($.expr[":"], {
    "contains-ci": function(elem, i, match, array) {
        return (elem.textContent || elem.innerText || $(elem).text() || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
    }
});
function confirma(idFesta){
	location.href="visualizarfesta.php?id="+idFesta;
}
</script>
<title>Par Ideal - Festas</title>
</head>
<body>
<div align="center" class="corpo">
						
						<br>
						<h3>Festas Pendentes</h3>
						<input type="text" class="input-search" alt="tabelaCSS" placeholder="Buscar nesta lista" style="width: 300px;"/>
							<table class="tabelaCSS">
								<thead>
								<tr>
									<td>Nome da Festa</td>	<td>Tema</td><td> Data </td>
								</tr>	
								</thead>				
						<?php FestaController::listarFestas(); ?>
						</table>
	</div>
	</body>
</html>